Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming


Defining methods

Within the main block of a class, you implement executable behavior using methods. Progress allows you to define a method as a named block that always begins with the METHOD statement and always ends with the END METHOD statement. A method must have an access modifier of PUBLIC, PROTECTED, or PRIVATE. Where and how a method can be invoked depends on its access modifier:

A method can have parameters and a defined return type (similar to a user-defined function); its return type can also be VOID, which means that it does not return a value. You can also define a method as FINAL, which means that it cannot be overridden in a subclass. The statements that you include inside a method block can include most of the statements that you include within the block of an internal procedure or user-defined function. For more information on defining methods, see the "Defining methods within a class" section.

Comparison with procedure-based programming

Methods generally combine the characteristics of the internal procedures and user-defined functions.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095